home *** CD-ROM | disk | FTP | other *** search
/ Meeting Pearls 1 / Meeting Pearls Vol 1 (1994).iso / installed_progs / linux / tools / amiga / gzip-1.1.2.lha / gzip-1.1.2 / configure.in < prev    next >
Encoding:
Text File  |  1993-06-02  |  2.0 KB  |  81 lines

  1. dnl Process this file with autoconf to produce a configure script for gzip
  2. dnl
  3. dnl Same as AC_RETSIGTYPE, but use a void default.
  4. dnl
  5. define(AC_RETSIGTYP,
  6. [AC_COMPILE_CHECK([return type of signal handlers],
  7. [#include <sys/types.h>
  8. #include <signal.h>
  9. #ifdef signal
  10. #undef signal
  11. #endif
  12. extern int (*signal ()) ();],
  13. [int i;],
  14. [AC_DEFINE(RETSIGTYPE, int)],
  15. [],
  16. )]
  17. )dnl
  18. dnl
  19. dnl End of local macros
  20. dnl
  21. AC_INIT(gzip.c)
  22. AC_PROG_CC
  23. dnl AC_PROG_CPP
  24. dnl
  25. dnl Try to assemble match.S with and without leading underline.
  26. dnl cc -E produces incorrect asm files on SVR4, we must use /lib/cpp.
  27. dnl Also, "gcc -E match.s" ignores -E, so we must use match.S.
  28. echo checking for underline in external names
  29. test -z "$CPP" -a -f /lib/cpp && CPP=/lib/cpp
  30. test -z "$CPP" && CPP="$CC -E"
  31. cat > conftest.c <<EOF
  32. int foo() {return 0;}
  33. EOF
  34. eval "$CC -c conftest.c > /dev/null 2>&1"
  35. if nm conftest.o | grep _foo > /dev/null 2>&1 ; then
  36.   :
  37. else
  38.   CPP="${CPP} -DNO_UNDERLINE"
  39. fi
  40. echo checking for assembler
  41. rm -f _match.o conftest.c conftest.o
  42. OBJA=""
  43. if eval "$CPP $srcdir/match.S > _match.s 2>/dev/null"; then
  44.   if test ! -s _match.s || grep error < _match.s > /dev/null; then
  45.     :
  46.   elif eval "$CC -c _match.s >/dev/null 2>&1" && test -f _match.o; then
  47.     DEFS="${DEFS} -DASMV"
  48.     OBJA=match.o
  49.   fi
  50. fi
  51. rm -f _match.s _match.o
  52. dnl
  53. AC_PROG_INSTALL
  54. AC_AIX
  55. AC_MINIX
  56. AC_ISC_POSIX
  57. AC_DYNIX_SEQ
  58. AC_STDC_HEADERS
  59. dnl if STDC_HEADERS can't be defined, look for special files:
  60. AC_HEADER_CHECK(string.h, ,AC_DEFINE(NO_STRING_H))
  61. AC_HEADER_CHECK(stdlib.h, ,AC_DEFINE(NO_STDLIB_H))
  62. AC_HEADER_CHECK(memory.h, ,AC_DEFINE(NO_MEMORY_H))
  63. AC_HEADER_CHECK(fcntl.h,  ,AC_DEFINE(NO_FCNTL_H))
  64. AC_HAVE_HEADERS(unistd.h)
  65. utime=0
  66. AC_HEADER_CHECK(utime.h, utime=1 ,AC_DEFINE(NO_UTIME_H))
  67. if test $utime -eq 0; then
  68.   AC_HAVE_HEADERS(sys/utime.h)
  69. fi
  70. AC_DIR_HEADER
  71. AC_XENIX_DIR
  72. AC_ALLOCA
  73. AC_RETSIGTYP
  74. AC_SIZE_T
  75. AC_HAVE_POUNDBANG([SEDCMD="1d"], [SEDCMD=""])
  76. AC_PREFIX(gzip)
  77. AC_SUBST(CFLAGS)dnl
  78. AC_SUBST(OBJA)dnl
  79. AC_SUBST(SEDCMD)dnl
  80. AC_OUTPUT(Makefile)
  81.